package org.csu.onlineedubackend.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.csu.onlineedubackend.entity.Lesson;
import org.csu.onlineedubackend.entity.User;
import org.csu.onlineedubackend.mapper.LessonMapper;
import org.csu.onlineedubackend.service.LessonService;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;

@Service
public class LessonServiceImpl extends ServiceImpl<LessonMapper, Lesson> implements LessonService {
    @Override
    public Map<String, Object> getLessonStats() {
        Map<String, Object> stats = new HashMap<>();

        // 查询课程总数
        long totalLessons = count();

        stats.put("totalLessons", totalLessons);
        return stats;
    }

}
